package com.ohuang.imghide

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment

abstract class ViewBindFragment< T : androidx.viewbinding.ViewBinding>:Fragment() {
    var binding:T?=null
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        binding=getViewBinding()
        initView()
        return binding!!.root
    }


    abstract fun getViewBinding():T

    abstract fun initView()

}